import { Injectable } from '@nestjs/common';
import {BookRepository} from './book.repository'

@Injectable()
export class BookService {
  private readonly list: number[];
  constructor(private readonly repository: BookRepository) {}
//   constructor() {
//     this.list = [1, 2, 3, 4, 5];
//   }
  async index() {
    return await this.repository.index();
  }

  findOne(id: number): number {
    return 1
    // return this.repository.index().find((item) => item == id);
  }
}
